package com.linx.workflow.service;

import com.linx.common.mybatis.core.page.PageQuery;
import com.linx.common.mybatis.core.page.TableDataInfo;
import com.linx.workflow.domain.bo.ProcessQuery;
import com.linx.workflow.domain.vo.WfDeployVo;
import org.flowable.engine.repository.ProcessDefinition;

import java.util.List;

/**
 * @author nbacheng
 * @createTime 2022/6/30 9:03
 */
public interface IWfDeployService {

    TableDataInfo<WfDeployVo> queryPageList(ProcessQuery processQuery, PageQuery pageQuery);

    TableDataInfo<WfDeployVo> queryPublishList(String processKey, PageQuery pageQuery);

    void updateState(String definitionId, String stateCode);

    String queryBpmnXmlById(String definitionId);

    void deleteByIds(List<String> deployIds);

    /**
     * 根据key获取最新版本的流程定义
     */
    ProcessDefinition getProcessDefinitionByKey(String processKey);
}
